import app from '@/app'
import { appendLocale } from '@/lang'
import locale from './locale'
import routes from '../routes'
import model from './model'

// 引入 Style
import './style/app.scss'

// 注册事件
app.plugin.register('checkout', () => {
  model.auto()
})

// 加载语言包
appendLocale('Fiskaly', locale)

// 创建插件路由
routes({
  path: 'fiskaly',
  component: () => import('./main.vue'),
  children: [
    {
      path: '',
      component: () => import('./view/index.vue')
    },
    {
      path: 'config',
      component: () => import('./view/config/index.vue')
    },
    {
      path: 'order',
      component: () => import('./view/order/index.vue')
    }
  ]
})
